<?php
 $yhendus=new mysqli("localhost", "if13", "ifikad", "if13_arthur");
 $kask=$yhendus->prepare("SELECT id, etteasted, syndmused, kellaaeg FROM etteasted ORDER BY kellaaeg");
 $kask->bind_result($id, $etteasted, $syndmused, $kellaaeg);
 $kask->execute();
?>
<!doctype html>
<html>
 <head>
 <link rel="stylesheet" type="text/css" href="stiil.css">
 <title>Etteasted</title>
 </head>
 <body>
 <h1 class="pealkiri">Etteastete loetelu</h1>
 <?php
 while($kask->fetch()){
 echo "<h1 class='etteaste'>Etteaste:</h1><h3>".htmlspecialchars($etteasted)."</h3>";
 echo "<h1 class='syndmus'>Sündmus:</h1>";
 echo "<h3>".htmlspecialchars($syndmused)."</h3>";
 echo "<h1 class='kell'>Kellaaeg:</h1>";
 echo "<h3>".htmlspecialchars($kellaaeg)."</h3>";
 }
 ?>
 </body>
</html>
<?php
 $yhendus->close();
?>